import ServiceBase from 'ServiceBase'

class Service extends ServiceBase {
    constructor() {
        super()
        this.$$prefix = ''
        this.$$path = {
            wechatSignUp: '/xcx/index/wechatSignUp',
            wechatSignIn: '/xcx/index/wechatSignIn',
            decryptData: '/xcx/index/decryptData',
            signIn: '/xcx/index/signIn',
            signOut: '/xcx/index/signOut',
            data: '/data/data.html',
            save: '/data/save.html',
            del: '/data/remove.html'
        }
    }

    wechatSignUp(params) {
        return this.postRequest(this.$$path.wechatSignUp, params)
    }

    wechatSignIn(params) {
        return this.postRequest(this.$$path.wechatSignIn, params)
    }

    wechatDecryptData(params) {
        return this.postRequest(this.$$path.decryptData, params)
    }


    signIn(params) {
        return this.postRequest(this.$$path.signIn, params)
    }

    signOut() {
        return this.postRequest(this.$$path.signOut)
    }

    //获取表格分页数据
    getData(params) {
        return this.getRequest(this.$$path.data, params)
    }

    //保存数据
    saveData(params) {
      return this.postRequest(this.$$path.save, params)
    }

    //删除数据
    delData(params) {
      return this.postRequest(this.$$path.del, params)
    }


}

export default Service